var menu_json_data = {

  menuitems:
    [
      {

        title: "通用功能",
        groups: [
          {
            title: "工作首页",
            id: "submenu00",
            href: "#submenu00",
            icon: "home",
            items: [
              {
                title: "业务展示板 (支行)",
                href: "./dashboard_1.html",
                msg: "",
              },
              {
                title: "业务展示板 (总分行)",
                href: "./dashboard_2.html",
                msg: "",
              },
              {
                title: "待办任务",
                href: "./client_list.html",
                msg: "2",
              },
              {
                title: "待办任务",
                href: "./client_list.html",
                msg: "2",
              },
              {
                title: "已办任务",
                href: "./counterparty_YSE_list.html",
                msg: "20",
              },
            ],
          },
          {
            title: "客户管理",
            id: "submenu01",
            href: "#submenu01",
            icon: "users",
            items: [
              {
                title: "客户信息管理",
                href: "./client_list.html",
                msg: "2",
              },
              {
                title: "外部客户映射管理",
                href: "./client_platform_map_list.html",
                msg: "2",
              },
              {
                title: "虚拟客户信息管理",
                href: "./platform_list.html",
                msg: "2",
              },
            ],
          },
          {
            title: "项目与协议管理",
            id: "submenu02",
            href: "#submenu02",
            icon: "codepen",
            items: [
              {
                title: "项目方案维护",
                href: "./project_list.html",
                icon: "layers",
              },
              {
                title: "协议方案维护",
                href: "./contract_list.html",
                icon: "tablet",
              },
            ],
          },
          {
            title: "限额管理",
            id: "submenu04",
            href: "#submenu04",

            icon: "sliders",
            items: [
              {
                title: "平台限额管理",
                href: "./project_list.html",
                icon: "layers",
              },
              {
                title: "限额监控",
                href: "./contract_list.html",
                icon: "tablet",
              },
            ],
          },
          {
            title: "综合管理",
            id: "submenu05",
            href: "#submenu05",

            icon: "monitor",
            items: [
              {
                title: "集中查询与打印",
                href: "",
                icon: "fa fa-pencil-square-o fa-lg",
              },
              {
                title: "放款订单异常处理",
                href: "./scf_core_xin_create.html",
                icon: "fa fa-pencil-square-o fa-lg",
              },
              {
                title: "来账订单处理",
                href: "",
                icon: "fa fa-pencil-square-o fa-lg",
              },
            ],
          },
          {
            title: "综合查询",
            id: "submenu06",
            href: "#submenu06",
            icon: "aperture",
            items: [
              {
                title: "融资申请查询",
                href: "",
                icon: "fa fa-pencil-square-o fa-lg",
              },
              {
                title: "融资借据查询",
                href: "./scf_core_xin_create.html",
                icon: "fa fa-pencil-square-o fa-lg",
              },
              {
                title: "回款查询",
                href: "./scf_core_xin_create.html",
                icon: "fa fa-pencil-square-o fa-lg",
              },
            ],
          },
          {
            title: "系统管理",
            id: "submenu07",
            href: "#submenu07",
            icon: "info",
            items: [
              {
                title: "机构管理",
                href: "",
                icon: "fa fa-pencil-square-o fa-lg",
              },
              {
                title: "用户管理",
                href: "./scf_core_xin_create.html",
                icon: "fa fa-pencil-square-o fa-lg",
              },
              {
                title: "角色管理",
                href: "",
                icon: "fa fa-pencil-square-o fa-lg",
              },
              {
                title: "权限管理",
                href: "./scf_core_xin_create.html",
                icon: "fa fa-pencil-square-o fa-lg",
              },
              {
                title: "自动化参数管理",
                href: "./scf_core_xin_create.html",
                icon: "fa fa-pencil-square-o fa-lg",
              },
              {
                title: "字典管理",
                href: "./scf_core_xin_create.html",
                icon: "fa fa-pencil-square-o fa-lg",
              },
              {
                title: "流程配置",
                href: "./scf_core_xin_create.html",
                icon: "fa fa-pencil-square-o fa-lg",
              },
            ],
          },
        ],
      },
      {
        title: "信融E功能",
        groups: [
          {
            title: "融资管理",
            id: "submenu10",
            href: "#submenu10",
            icon: "tag",
            items: [
              {
                title: "融资受理审批",
                href: "",
                icon: "fa fa-pencil-square-o fa-lg",
              },
            ],
          },
          {
            title: "信融E发票验真",
            id: "submenu13",
            href: "#submenu13",
            icon: "tag",
          },
          {
            title: "中登网登记管理",
            id: "submenu14",
            href: "#submenu14",
            icon: "tag",
            items: [
              {
                title: "中登网登记",
                href: "",
                icon: "fa fa-pencil-square-o fa-lg",
              },
              {
                title: "中登网登记撤销",
                href: "",
                icon: "fa fa-pencil-square-o fa-lg",
              },
            ],
          },
          {
            title: "综合查询",
            id: "submenu11",
            href: "#submenu11",
            icon: "aperture",
            items: [
              {
                title: "应收账款查询",
                href: "",
                icon: "fa fa-pencil-square-o fa-lg",
              },
              {
                title: "融资借据查询",
                href: "./scf_core_xin_create.html",
                icon: "fa fa-pencil-square-o fa-lg",
              },
              {
                title: "费用查询",
                href: "./scf_core_xin_create.html",
                icon: "fa fa-pencil-square-o fa-lg",
              },
            ],
          },
          {
            title: "预警管理",
            id: "submenu12",
            href: "#submenu12",
            icon: "monitor",
            items: [
              {
                title: "业务头寸维护",
                href: "business_amt_list.html",
                icon: "fa fa-pencil-square-o fa-lg",
              },
            ],
          },
        ],
      },
      {
        title: "应收E功能",
        groups: [
          {
            title: "买方管理",
            id: "submenu20",
            href: "#submenu20",
            icon: "tag",
            items: [
              {
                title: "应收账款买方管理",
                href: "",
                msg: "20",
              },
            ],
          },
          {
            title: "应收账款管理",
            id: "submenu21",
            href: "#submenu21",
            icon: "tag",
            items: [
              {
                title: "应收账款资产管理",
                href: "./demo_客户_资产_应收账款.html",
                icon: "fa fa-pencil-square-o fa-lg",
              },
              {
                title: "单据验真",
                href: "./ar_recieve_valid_list.html",
                icon: "fa fa-pencil-square-o fa-lg",
              },
            ],
          },
          
          {
            title: "综合查询",
            id: "submenu22",
            href: "#submenu22",
            icon: "aperture",
            items: [
              {
                title: "应收账款查询",
                href: "",
                icon: "fa fa-pencil-square-o fa-lg",
              },
              {
                title: "监管方查询",
                href: "",
                icon: "fa fa-pencil-square-o fa-lg",
              },
            
              {
                title: "对账查询",
                href: "./scf_core_xin_create.html",
                icon: "fa fa-pencil-square-o fa-lg",
              },
             
              {
                title: "费用查询",
                href: "./scf_core_xin_create.html",
                icon: "fa fa-pencil-square-o fa-lg",
              },
            ],
          },
          {
            title: "预警管理",
            id: "submenu23",
            href: "#submenu23",
            icon: "monitor",
            items: [
              {
                title: "业务头寸维护",
                href: "business_amt_list.html",
                icon: "fa fa-pencil-square-o fa-lg",
              },
            ],
          },
        ],
      },
      {
        title: "采购E管理",
        groups: [
          {
            title: "订单管理",
            id: "submenu30",
            href: "#submenu30",
            icon: "tag",
            items: [
              {
                title: "订单查询",
                href: "./counterparty_YSE_list.html",
                msg: "20",
              },
            ],
          },
          {
            title: "货物管理",
            id: "submenu31",
            href: "#submenu31",
            icon: "tag",
            items: [
              {
                title: "提前还款",
                href: "",
                icon: "fa fa-pencil-square-o fa-lg",
              },
              {
                title: "溢出款划拨",
                href: "./scf_core_xin_create.html",
                icon: "fa fa-pencil-square-o fa-lg",
              },
            ],
          },
         
          {
            title: "查询",
            id: "submenu32",
            href: "#submenu32",
            icon: "aperture",
            items: [
              {
                title: "应收账款查询",
                href: "",
                icon: "fa fa-pencil-square-o fa-lg",
              },
              {
                title: "监管方查询",
                href: "",
                icon: "fa fa-pencil-square-o fa-lg",
              },
              {
                title: "货物查询",
                href: "",
                icon: "fa fa-pencil-square-o fa-lg",
              },
              {
                title: "对账查询",
                href: "./scf_core_xin_create.html",
                icon: "fa fa-pencil-square-o fa-lg",
              },
              {
                title: "融资申请查询",
                href: "",
                icon: "fa fa-pencil-square-o fa-lg",
              },
              {
                title: "融资借据查询",
                href: "./scf_core_xin_create.html",
                icon: "fa fa-pencil-square-o fa-lg",
              },
              {
                title: "费用查询",
                href: "./scf_core_xin_create.html",
                icon: "fa fa-pencil-square-o fa-lg",
              },
            ],
          },
          {
            title: "预警管理",
            id: "submenu38",
            href: "#submenu38",
            icon: "monitor",
            items: [
              {
                title: "业务头寸维护",
                href: "business_amt_list.html",
                icon: "fa fa-pencil-square-o fa-lg",
              },
            ],
          },
        ],
      },
      {
        title: "订单融资功能",
        groups: [
          {
            title: "订单管理",
            id: "submenu30",
            href: "#submenu30",
            icon: "tag",
            items: [
              {
                title: "应收账款买方管理",
                href: "./counterparty_YSE_list.html",
                msg: "20",
              },
            ],
          },
          {
            title: "融资管理",
            id: "submenu31",
            href: "#submenu31",
            icon: "tag",
            items: [
              {
                title: "提前还款",
                href: "",
                icon: "fa fa-pencil-square-o fa-lg",
              },
              {
                title: "溢出款划拨",
                href: "./scf_core_xin_create.html",
                icon: "fa fa-pencil-square-o fa-lg",
              },
            ],
          },
          {
            title: "中登网登记管理",
            id: "submenu34",
            href: "#submenu34",
            icon: "tag",
            items: [
              {
                title: "中登网登记",
                href: "",
                icon: "fa fa-pencil-square-o fa-lg",
              },
              {
                title: "中登网登记撤销",
                href: "",
                icon: "fa fa-pencil-square-o fa-lg",
              },
            ],
          },
          {
            title: "查询",
            id: "submenu32",
            href: "#submenu32",
            icon: "aperture",
            items: [
              {
                title: "应收账款查询",
                href: "",
                icon: "fa fa-pencil-square-o fa-lg",
              },
              {
                title: "监管方查询",
                href: "",
                icon: "fa fa-pencil-square-o fa-lg",
              },
              {
                title: "货物查询",
                href: "",
                icon: "fa fa-pencil-square-o fa-lg",
              },
              {
                title: "对账查询",
                href: "./scf_core_xin_create.html",
                icon: "fa fa-pencil-square-o fa-lg",
              },
              {
                title: "融资申请查询",
                href: "",
                icon: "fa fa-pencil-square-o fa-lg",
              },
              {
                title: "融资借据查询",
                href: "./scf_core_xin_create.html",
                icon: "fa fa-pencil-square-o fa-lg",
              },
              {
                title: "费用查询",
                href: "./scf_core_xin_create.html",
                icon: "fa fa-pencil-square-o fa-lg",
              },
            ],
          },
          {
            title: "预警管理",
            id: "submenu38",
            href: "#submenu38",
            icon: "monitor",
            items: [
              {
                title: "业务头寸维护",
                href: "business_amt_list.html",
                icon: "fa fa-pencil-square-o fa-lg",
              },
            ],
          },
        ],
      },
    ]
};

var alerts = {
  total: 5,
  items: [
    {
      content: "发送应收账款准入（手工）申请,请审批",
      title: "预警模块",
      level: "text-danger",
      icon: "bell",
      time: "2小时前",
    },
    {
      content: "发送应收账款准入（手工）申请,请审批",
      title: "预警模块",
      level: "text-warning",
      icon: "home",
      time: "2小时前",
    },
  ],
};

var messages = {
  total: 5,
  items: [
    {
      content: "发送应收账款准入（手工）申请,请审批",
      who: "朱晓磊",
      avatar: "img/avatar/zhuxiaolei.jpg",
      time: "2小时前",
    },
    {
      content: "发送天士力项目买方准入（手工）申请,请审批",
      who: "艾睿",
      avatar: "img/avatar/airui.jpg",
      time: "2小时前",
      icon: "home",
    },
  ],
};

function initSidebarMenu(groupPos = 0, pos = 0, subpos = 0) {

  for (var i in menu_json_data.menuitems) { //遍历json数组时，这么写p为索引，0,1
    menuItem = menu_json_data.menuitems[i]
    if (i == groupPos) {
      menuItem.actived = true
      for (var j in menuItem.groups) {
        group = menuItem.groups[j]
        if (j == pos) {
          group.actived = true
          for (var k in group.items) {
            item = group.items[k]
            if (k == subpos) {
              item.actived = true
            } else {
              item.actived = false
            }
          }
        } else {
          group.actived = false
        }
      }

    }else{
      menuItem.actived = false
    }





  }


}
